package com.zx.idc.backend.gui.sys;


import com.zx.idc.backend.gui.common.Result;
import com.zx.idc.ds.sys.bean.index.MonitorServerInfo;
import com.zx.idc.ds.sys.service.ISysServerConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.zx.idc.backend.gui.common.BaseApi;

/**
 * <p>
 * 服务器监控配置 前端控制器
 * </p>
 *
 * @author zcj
 * @since 2021-06-30
 */
@RestController
@RequestMapping("/api/sysServerConfig")
public class SysServerConfigController extends BaseApi {

    @Autowired
    private ISysServerConfigService iSysServerConfigService;

    @GetMapping("/getInfo")
    public Result<MonitorServerInfo> getInfo(){
        return success(iSysServerConfigService.getInfo());
    }

    @PostMapping("/add")
    public Result<Boolean> saveInfo(@RequestBody MonitorServerInfo monitorServerInfo){
        return success(iSysServerConfigService.saveInfo(monitorServerInfo));
    }

}

